export const CLPoolManagerAbi = [
  {
    type: 'constructor',
    inputs: [{ name: '_vault', type: 'address', internalType: 'contract IVault' }],
    stateMutability: 'nonpayable',
  },
  {
    type: 'function',
    name: 'collectProtocolFees',
    inputs: [
      { name: 'recipient', type: 'address', internalType: 'address' },
      { name: 'currency', type: 'address', internalType: 'Currency' },
      { name: 'amount', type: 'uint256', internalType: 'uint256' },
    ],
    outputs: [{ name: 'amountCollected', type: 'uint256', internalType: 'uint256' }],
    stateMutability: 'nonpayable',
  },
  {
    type: 'function',
    name: 'donate',
    inputs: [
      {
        name: 'key',
        type: 'tuple',
        internalType: 'struct PoolKey',
        components: [
          { name: 'currency0', type: 'address', internalType: 'Currency' },
          { name: 'currency1', type: 'address', internalType: 'Currency' },
          { name: 'hooks', type: 'address', internalType: 'contract IHooks' },
          { name: 'poolManager', type: 'address', internalType: 'contract IPoolManager' },
          { name: 'fee', type: 'uint24', internalType: 'uint24' },
          { name: 'parameters', type: 'bytes32', internalType: 'bytes32' },
        ],
      },
      { name: 'amount0', type: 'uint256', internalType: 'uint256' },
      { name: 'amount1', type: 'uint256', internalType: 'uint256' },
      { name: 'hookData', type: 'bytes', internalType: 'bytes' },
    ],
    outputs: [{ name: 'delta', type: 'int256', internalType: 'BalanceDelta' }],
    stateMutability: 'nonpayable',
  },
  {
    type: 'function',
    name: 'extsload',
    inputs: [{ name: 'slot', type: 'bytes32', internalType: 'bytes32' }],
    outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
    stateMutability: 'view',
  },
  {
    type: 'function',
    name: 'extsload',
    inputs: [{ name: 'slots', type: 'bytes32[]', internalType: 'bytes32[]' }],
    outputs: [{ name: '', type: 'bytes32[]', internalType: 'bytes32[]' }],
    stateMutability: 'view',
  },
  {
    type: 'function',
    name: 'getFeeGrowthGlobals',
    inputs: [{ name: 'id', type: 'bytes32', internalType: 'PoolId' }],
    outputs: [
      { name: 'feeGrowthGlobal0x128', type: 'uint256', internalType: 'uint256' },
      { name: 'feeGrowthGlobal1x128', type: 'uint256', internalType: 'uint256' },
    ],
    stateMutability: 'view',
  },
  {
    type: 'function',
    name: 'getLiquidity',
    inputs: [
      { name: 'id', type: 'bytes32', internalType: 'PoolId' },
      { name: '_owner', type: 'address', internalType: 'address' },
      { name: 'tickLower', type: 'int24', internalType: 'int24' },
      { name: 'tickUpper', type: 'int24', internalType: 'int24' },
      { name: 'salt', type: 'bytes32', internalType: 'bytes32' },
    ],
    outputs: [{ name: 'liquidity', type: 'uint128', internalType: 'uint128' }],
    stateMutability: 'view',
  },
  {
    type: 'function',
    name: 'getLiquidity',
    inputs: [{ name: 'id', type: 'bytes32', internalType: 'PoolId' }],
    outputs: [{ name: 'liquidity', type: 'uint128', internalType: 'uint128' }],
    stateMutability: 'view',
  },
  {
    type: 'function',
    name: 'getPoolBitmapInfo',
    inputs: [
      { name: 'id', type: 'bytes32', internalType: 'PoolId' },
      { name: 'word', type: 'int16', internalType: 'int16' },
    ],
    outputs: [{ name: 'tickBitmap', type: 'uint256', internalType: 'uint256' }],
    stateMutability: 'view',
  },
  {
    type: 'function',
    name: 'getPoolTickInfo',
    inputs: [
      { name: 'id', type: 'bytes32', internalType: 'PoolId' },
      { name: 'tick', type: 'int24', internalType: 'int24' },
    ],
    outputs: [
      {
        name: '',
        type: 'tuple',
        internalType: 'struct Tick.Info',
        components: [
          { name: 'liquidityGross', type: 'uint128', internalType: 'uint128' },
          { name: 'liquidityNet', type: 'int128', internalType: 'int128' },
          { name: 'feeGrowthOutside0X128', type: 'uint256', internalType: 'uint256' },
          { name: 'feeGrowthOutside1X128', type: 'uint256', internalType: 'uint256' },
        ],
      },
    ],
    stateMutability: 'view',
  },
  {
    type: 'function',
    name: 'getPosition',
    inputs: [
      { name: 'id', type: 'bytes32', internalType: 'PoolId' },
      { name: 'owner', type: 'address', internalType: 'address' },
      { name: 'tickLower', type: 'int24', internalType: 'int24' },
      { name: 'tickUpper', type: 'int24', internalType: 'int24' },
      { name: 'salt', type: 'bytes32', internalType: 'bytes32' },
    ],
    outputs: [
      {
        name: 'position',
        type: 'tuple',
        internalType: 'struct CLPosition.Info',
        components: [
          { name: 'liquidity', type: 'uint128', internalType: 'uint128' },
          { name: 'feeGrowthInside0LastX128', type: 'uint256', internalType: 'uint256' },
          { name: 'feeGrowthInside1LastX128', type: 'uint256', internalType: 'uint256' },
        ],
      },
    ],
    stateMutability: 'view',
  },
  {
    type: 'function',
    name: 'getSlot0',
    inputs: [{ name: 'id', type: 'bytes32', internalType: 'PoolId' }],
    outputs: [
      { name: 'sqrtPriceX96', type: 'uint160', internalType: 'uint160' },
      { name: 'tick', type: 'int24', internalType: 'int24' },
      { name: 'protocolFee', type: 'uint24', internalType: 'uint24' },
      { name: 'lpFee', type: 'uint24', internalType: 'uint24' },
    ],
    stateMutability: 'view',
  },
  {
    type: 'function',
    name: 'initialize',
    inputs: [
      {
        name: 'key',
        type: 'tuple',
        internalType: 'struct PoolKey',
        components: [
          { name: 'currency0', type: 'address', internalType: 'Currency' },
          { name: 'currency1', type: 'address', internalType: 'Currency' },
          { name: 'hooks', type: 'address', internalType: 'contract IHooks' },
          { name: 'poolManager', type: 'address', internalType: 'contract IPoolManager' },
          { name: 'fee', type: 'uint24', internalType: 'uint24' },
          { name: 'parameters', type: 'bytes32', internalType: 'bytes32' },
        ],
      },
      { name: 'sqrtPriceX96', type: 'uint160', internalType: 'uint160' },
    ],
    outputs: [{ name: 'tick', type: 'int24', internalType: 'int24' }],
    stateMutability: 'nonpayable',
  },
  {
    type: 'function',
    name: 'modifyLiquidity',
    inputs: [
      {
        name: 'key',
        type: 'tuple',
        internalType: 'struct PoolKey',
        components: [
          { name: 'currency0', type: 'address', internalType: 'Currency' },
          { name: 'currency1', type: 'address', internalType: 'Currency' },
          { name: 'hooks', type: 'address', internalType: 'contract IHooks' },
          { name: 'poolManager', type: 'address', internalType: 'contract IPoolManager' },
          { name: 'fee', type: 'uint24', internalType: 'uint24' },
          { name: 'parameters', type: 'bytes32', internalType: 'bytes32' },
        ],
      },
      {
        name: 'params',
        type: 'tuple',
        internalType: 'struct ICLPoolManager.ModifyLiquidityParams',
        components: [
          { name: 'tickLower', type: 'int24', internalType: 'int24' },
          { name: 'tickUpper', type: 'int24', internalType: 'int24' },
          { name: 'liquidityDelta', type: 'int256', internalType: 'int256' },
          { name: 'salt', type: 'bytes32', internalType: 'bytes32' },
        ],
      },
      { name: 'hookData', type: 'bytes', internalType: 'bytes' },
    ],
    outputs: [
      { name: 'delta', type: 'int256', internalType: 'BalanceDelta' },
      { name: 'feeDelta', type: 'int256', internalType: 'BalanceDelta' },
    ],
    stateMutability: 'nonpayable',
  },
  {
    type: 'function',
    name: 'owner',
    inputs: [],
    outputs: [{ name: '', type: 'address', internalType: 'address' }],
    stateMutability: 'view',
  },
  { type: 'function', name: 'pause', inputs: [], outputs: [], stateMutability: 'nonpayable' },
  {
    type: 'function',
    name: 'paused',
    inputs: [],
    outputs: [{ name: 'res', type: 'bool', internalType: 'bool' }],
    stateMutability: 'view',
  },
  {
    type: 'function',
    name: 'poolIdToPoolKey',
    inputs: [{ name: 'id', type: 'bytes32', internalType: 'PoolId' }],
    outputs: [
      { name: 'currency0', type: 'address', internalType: 'Currency' },
      { name: 'currency1', type: 'address', internalType: 'Currency' },
      { name: 'hooks', type: 'address', internalType: 'contract IHooks' },
      { name: 'poolManager', type: 'address', internalType: 'contract IPoolManager' },
      { name: 'fee', type: 'uint24', internalType: 'uint24' },
      { name: 'parameters', type: 'bytes32', internalType: 'bytes32' },
    ],
    stateMutability: 'view',
  },
  {
    type: 'function',
    name: 'protocolFeeController',
    inputs: [],
    outputs: [{ name: '', type: 'address', internalType: 'contract IProtocolFeeController' }],
    stateMutability: 'view',
  },
  {
    type: 'function',
    name: 'protocolFeesAccrued',
    inputs: [{ name: 'currency', type: 'address', internalType: 'Currency' }],
    outputs: [{ name: 'amount', type: 'uint256', internalType: 'uint256' }],
    stateMutability: 'view',
  },
  {
    type: 'function',
    name: 'setProtocolFee',
    inputs: [
      {
        name: 'key',
        type: 'tuple',
        internalType: 'struct PoolKey',
        components: [
          { name: 'currency0', type: 'address', internalType: 'Currency' },
          { name: 'currency1', type: 'address', internalType: 'Currency' },
          { name: 'hooks', type: 'address', internalType: 'contract IHooks' },
          { name: 'poolManager', type: 'address', internalType: 'contract IPoolManager' },
          { name: 'fee', type: 'uint24', internalType: 'uint24' },
          { name: 'parameters', type: 'bytes32', internalType: 'bytes32' },
        ],
      },
      { name: 'newProtocolFee', type: 'uint24', internalType: 'uint24' },
    ],
    outputs: [],
    stateMutability: 'nonpayable',
  },
  {
    type: 'function',
    name: 'setProtocolFeeController',
    inputs: [{ name: 'controller', type: 'address', internalType: 'contract IProtocolFeeController' }],
    outputs: [],
    stateMutability: 'nonpayable',
  },
  {
    type: 'function',
    name: 'swap',
    inputs: [
      {
        name: 'key',
        type: 'tuple',
        internalType: 'struct PoolKey',
        components: [
          { name: 'currency0', type: 'address', internalType: 'Currency' },
          { name: 'currency1', type: 'address', internalType: 'Currency' },
          { name: 'hooks', type: 'address', internalType: 'contract IHooks' },
          { name: 'poolManager', type: 'address', internalType: 'contract IPoolManager' },
          { name: 'fee', type: 'uint24', internalType: 'uint24' },
          { name: 'parameters', type: 'bytes32', internalType: 'bytes32' },
        ],
      },
      {
        name: 'params',
        type: 'tuple',
        internalType: 'struct ICLPoolManager.SwapParams',
        components: [
          { name: 'zeroForOne', type: 'bool', internalType: 'bool' },
          { name: 'amountSpecified', type: 'int256', internalType: 'int256' },
          { name: 'sqrtPriceLimitX96', type: 'uint160', internalType: 'uint160' },
        ],
      },
      { name: 'hookData', type: 'bytes', internalType: 'bytes' },
    ],
    outputs: [{ name: 'delta', type: 'int256', internalType: 'BalanceDelta' }],
    stateMutability: 'nonpayable',
  },
  {
    type: 'function',
    name: 'transferOwnership',
    inputs: [{ name: 'newOwner', type: 'address', internalType: 'address' }],
    outputs: [],
    stateMutability: 'nonpayable',
  },
  { type: 'function', name: 'unpause', inputs: [], outputs: [], stateMutability: 'nonpayable' },
  {
    type: 'function',
    name: 'updateDynamicLPFee',
    inputs: [
      {
        name: 'key',
        type: 'tuple',
        internalType: 'struct PoolKey',
        components: [
          { name: 'currency0', type: 'address', internalType: 'Currency' },
          { name: 'currency1', type: 'address', internalType: 'Currency' },
          { name: 'hooks', type: 'address', internalType: 'contract IHooks' },
          { name: 'poolManager', type: 'address', internalType: 'contract IPoolManager' },
          { name: 'fee', type: 'uint24', internalType: 'uint24' },
          { name: 'parameters', type: 'bytes32', internalType: 'bytes32' },
        ],
      },
      { name: 'newDynamicLPFee', type: 'uint24', internalType: 'uint24' },
    ],
    outputs: [],
    stateMutability: 'nonpayable',
  },
  {
    type: 'function',
    name: 'vault',
    inputs: [],
    outputs: [{ name: '', type: 'address', internalType: 'contract IVault' }],
    stateMutability: 'view',
  },
  {
    type: 'event',
    name: 'Donate',
    inputs: [
      { name: 'id', type: 'bytes32', indexed: true, internalType: 'PoolId' },
      { name: 'sender', type: 'address', indexed: true, internalType: 'address' },
      { name: 'amount0', type: 'uint256', indexed: false, internalType: 'uint256' },
      { name: 'amount1', type: 'uint256', indexed: false, internalType: 'uint256' },
      { name: 'tick', type: 'int24', indexed: false, internalType: 'int24' },
    ],
    anonymous: false,
  },
  {
    type: 'event',
    name: 'DynamicLPFeeUpdated',
    inputs: [
      { name: 'id', type: 'bytes32', indexed: true, internalType: 'PoolId' },
      { name: 'dynamicLPFee', type: 'uint24', indexed: false, internalType: 'uint24' },
    ],
    anonymous: false,
  },
  {
    type: 'event',
    name: 'Initialize',
    inputs: [
      { name: 'id', type: 'bytes32', indexed: true, internalType: 'PoolId' },
      { name: 'currency0', type: 'address', indexed: true, internalType: 'Currency' },
      { name: 'currency1', type: 'address', indexed: true, internalType: 'Currency' },
      { name: 'hooks', type: 'address', indexed: false, internalType: 'contract IHooks' },
      { name: 'fee', type: 'uint24', indexed: false, internalType: 'uint24' },
      { name: 'parameters', type: 'bytes32', indexed: false, internalType: 'bytes32' },
      { name: 'sqrtPriceX96', type: 'uint160', indexed: false, internalType: 'uint160' },
      { name: 'tick', type: 'int24', indexed: false, internalType: 'int24' },
    ],
    anonymous: false,
  },
  {
    type: 'event',
    name: 'ModifyLiquidity',
    inputs: [
      { name: 'id', type: 'bytes32', indexed: true, internalType: 'PoolId' },
      { name: 'sender', type: 'address', indexed: true, internalType: 'address' },
      { name: 'tickLower', type: 'int24', indexed: false, internalType: 'int24' },
      { name: 'tickUpper', type: 'int24', indexed: false, internalType: 'int24' },
      { name: 'liquidityDelta', type: 'int256', indexed: false, internalType: 'int256' },
      { name: 'salt', type: 'bytes32', indexed: false, internalType: 'bytes32' },
    ],
    anonymous: false,
  },
  {
    type: 'event',
    name: 'OwnershipTransferred',
    inputs: [
      { name: 'previousOwner', type: 'address', indexed: true, internalType: 'address' },
      { name: 'newOwner', type: 'address', indexed: true, internalType: 'address' },
    ],
    anonymous: false,
  },
  {
    type: 'event',
    name: 'Paused',
    inputs: [{ name: 'account', type: 'address', indexed: false, internalType: 'address' }],
    anonymous: false,
  },
  {
    type: 'event',
    name: 'ProtocolFeeControllerUpdated',
    inputs: [{ name: 'protocolFeeController', type: 'address', indexed: true, internalType: 'address' }],
    anonymous: false,
  },
  {
    type: 'event',
    name: 'ProtocolFeeUpdated',
    inputs: [
      { name: 'id', type: 'bytes32', indexed: true, internalType: 'PoolId' },
      { name: 'protocolFee', type: 'uint24', indexed: false, internalType: 'uint24' },
    ],
    anonymous: false,
  },
  {
    type: 'event',
    name: 'Swap',
    inputs: [
      { name: 'id', type: 'bytes32', indexed: true, internalType: 'PoolId' },
      { name: 'sender', type: 'address', indexed: true, internalType: 'address' },
      { name: 'amount0', type: 'int128', indexed: false, internalType: 'int128' },
      { name: 'amount1', type: 'int128', indexed: false, internalType: 'int128' },
      { name: 'sqrtPriceX96', type: 'uint160', indexed: false, internalType: 'uint160' },
      { name: 'liquidity', type: 'uint128', indexed: false, internalType: 'uint128' },
      { name: 'tick', type: 'int24', indexed: false, internalType: 'int24' },
      { name: 'fee', type: 'uint24', indexed: false, internalType: 'uint24' },
      { name: 'protocolFee', type: 'uint16', indexed: false, internalType: 'uint16' },
    ],
    anonymous: false,
  },
  {
    type: 'event',
    name: 'Unpaused',
    inputs: [{ name: 'account', type: 'address', indexed: false, internalType: 'address' }],
    anonymous: false,
  },
  { type: 'error', name: 'CannotUpdateEmptyPosition', inputs: [] },
  {
    type: 'error',
    name: 'CurrenciesInitializedOutOfOrder',
    inputs: [
      { name: 'currency0', type: 'address', internalType: 'address' },
      { name: 'currency1', type: 'address', internalType: 'address' },
    ],
  },
  { type: 'error', name: 'EnforcedPause', inputs: [] },
  { type: 'error', name: 'HookConfigValidationError', inputs: [] },
  { type: 'error', name: 'HookDeltaExceedsSwapAmount', inputs: [] },
  { type: 'error', name: 'HookPermissionsValidationError', inputs: [] },
  { type: 'error', name: 'InvalidCaller', inputs: [] },
  { type: 'error', name: 'InvalidFeeForExactOut', inputs: [] },
  { type: 'error', name: 'InvalidHookResponse', inputs: [] },
  {
    type: 'error',
    name: 'InvalidSqrtPriceLimit',
    inputs: [
      { name: 'sqrtPriceCurrentX96', type: 'uint160', internalType: 'uint160' },
      { name: 'sqrtPriceLimitX96', type: 'uint160', internalType: 'uint160' },
    ],
  },
  {
    type: 'error',
    name: 'InvalidSqrtRatio',
    inputs: [{ name: 'sqrtPriceX96', type: 'uint160', internalType: 'uint160' }],
  },
  { type: 'error', name: 'InvalidTick', inputs: [{ name: 'tick', type: 'int24', internalType: 'int24' }] },
  { type: 'error', name: 'LPFeeTooLarge', inputs: [{ name: 'fee', type: 'uint24', internalType: 'uint24' }] },
  { type: 'error', name: 'NoLiquidityToReceiveFees', inputs: [] },
  { type: 'error', name: 'PoolAlreadyInitialized', inputs: [] },
  { type: 'error', name: 'PoolManagerMismatch', inputs: [] },
  { type: 'error', name: 'PoolNotInitialized', inputs: [] },
  { type: 'error', name: 'PoolPaused', inputs: [] },
  { type: 'error', name: 'ProtocolFeeCannotBeFetched', inputs: [] },
  { type: 'error', name: 'ProtocolFeeTooLarge', inputs: [{ name: 'fee', type: 'uint24', internalType: 'uint24' }] },
  { type: 'error', name: 'SwapAmountCannotBeZero', inputs: [] },
  { type: 'error', name: 'TickLiquidityOverflow', inputs: [{ name: 'tick', type: 'int24', internalType: 'int24' }] },
  {
    type: 'error',
    name: 'TickLowerOutOfBounds',
    inputs: [{ name: 'tickLower', type: 'int24', internalType: 'int24' }],
  },
  {
    type: 'error',
    name: 'TickSpacingTooLarge',
    inputs: [{ name: 'tickSpacing', type: 'int24', internalType: 'int24' }],
  },
  {
    type: 'error',
    name: 'TickSpacingTooSmall',
    inputs: [{ name: 'tickSpacing', type: 'int24', internalType: 'int24' }],
  },
  {
    type: 'error',
    name: 'TickUpperOutOfBounds',
    inputs: [{ name: 'tickUpper', type: 'int24', internalType: 'int24' }],
  },
  {
    type: 'error',
    name: 'TicksMisordered',
    inputs: [
      { name: 'tickLower', type: 'int24', internalType: 'int24' },
      { name: 'tickUpper', type: 'int24', internalType: 'int24' },
    ],
  },
  { type: 'error', name: 'UnauthorizedDynamicLPFeeUpdate', inputs: [] },
  { type: 'error', name: 'UnusedBitsNonZero', inputs: [] },
] as const
